package com.javalei.soso2020.action;

import com.javalei.soso2020.dao.ListDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * User: zzw
 * Date: 2020-01-05-19:20
 * Description: 获取todoList的接口
 */
@RequestMapping("/list")
@RestController
public class ListAction {
    @Autowired
    private ListDao listDao;

    @RequestMapping("/getList")
    public List<String> getList() {

        return listDao.getList();
    }


    @RequestMapping("/addList")
    public int getList(String text) {
        return listDao.addList(text);
    }
}
